package service;

import client.ClientConnectServiceThread;

import java.util.HashMap;

public class ManageServiceConnectClientThread {
    public static HashMap<String, ServiceConnectClientThread> stringServiceConnectClientThreadHashMap = new HashMap();

    //根据用户id来存入线程
    public static void addThreadMap(String userId,ServiceConnectClientThread serviceConnectClientThread)
    {
        stringServiceConnectClientThreadHashMap.put(userId,serviceConnectClientThread);
    }
    //根据用户id取出线程
    public static ServiceConnectClientThread getThreadMap(String userId)
    {
        ServiceConnectClientThread serviceConnectClientThread = stringServiceConnectClientThreadHashMap.get(userId);
        return serviceConnectClientThread;
    }

    //根据用户id删除线程
    public static void removeThreadMap(String userId)
    {
        stringServiceConnectClientThreadHashMap.remove(userId);
    }
}
